;;; +auto-save.el --- Auto Save files when idle -*- lexical-binding: t -*-

;;; Commentary:

;;; Code:

;; -------- auto-save --------
(use-package auto-save
  :load-path "lazycat-bucket/auto-save"
  :if (file-exists-p
       (expand-file-name "lazycat-bucket/auto-save/auto-save.el"
                         user-emacs-directory))
  ;; :init
  ;; (setq auto-save-idle 1.5)
  :custom
  (auto-save-slient t)
  (auto-save-delete-trailing-whitespace t)
  :config
  (auto-save-enable)
  (setq auto-save-disable-predicates
        '((lambda ()
            (string-suffix-p
             "dict.yaml"
             (concat (file-name-extension (file-name-base (buffer-name)))
                     "." (file-name-extension (buffer-name)))
             t))
          (lambda ()
            (string-suffix-p
             "gpg"
             (file-name-extension (buffer-name))
             t)))))

(provide '+auto-save)

;;; +auto-save.el ends here
